package com.oa.api;


import com.oa.oaspccommon.po.Company;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author zd
 * @date 2021年04月14日 15:07
 */
@FeignClient("oa-spc-system")
public interface CompanyServiceApi {

    /**
     * 查询所有
     * @return
     */
    @RequestMapping(value = "/companys",method = RequestMethod.GET)
    public List<Company> findCompanys();

    /**
     * 查询
     * @param cid
     * @return
     */
    @RequestMapping(value = "/company",method = RequestMethod.GET)
    public Company findCompany(@RequestParam("cid") Integer cid);

    /**
     * 修改
     * @param company
     * @return
     */
    @RequestMapping(value = "/company",method = RequestMethod.PUT)
    public Boolean updateCompany(@RequestBody Company company);

    /**
     * 添加company
     *
     */
    @RequestMapping(value = "/company",method = RequestMethod.POST)
    public Boolean addCompany(@RequestBody Company company);
}
